package com.mask.chapter02;

import java.util.HashSet;

public class BookHashSetTest {
    public static void main(String[] args) {
        HashSet<Book> bookHashSet = new HashSet<>();
        for (int i = 1; i < 15; i++) {
            Book book = new Book("bookId" + i, "bookName" + i,
                    "author" + i, i % 2 == 0 ? 1 : 2, i * 10.0, "isbn" + i, "publishing" + i,
                    "introduce" + i, i % 2 == 1 ? 1 : 0);
            bookHashSet.add(book);
        }
        bookHashSet.forEach(book -> System.out.println("图书信息:"+book));
    }
}
